Licensed channel defaults, phone map growth, and payload read bounds - #11286
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe changes bound packet parsing to received payload sizes, preserve licensed channel configuration during default initialization, and restrict port timestamp tracking to rate-limited port numbers. ChangesSafety hardening
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
⚡ Try this PR in the Web FlasherWarning This is an automated, unreviewed CI test build. Back up your device configuration Supported boards built by this PR (31)
Build artifacts expire on 2026-08-28. Updated for |
Last three follow-ups from the post-release backlog, one commit each. Independent of #11282, #11283, #11284 and #11285; all five branch from develop and merge cleanly in any order.
resetRadioConfig()installs the default channels, which carry the public PSK, but onlyloadFromDisk()sanitized them. When the channel file is absent or corrupt that call is a no-op (channels_countis 0), so a first boot or factory reset of a ham-only board could transmit encrypted on ham allocations until the next boot. Now stripped again right afterinitDefaults(), beforeonConfigChanged()publishes hashes.lastPortNumToRadiowas written for every portnum a client sent, but only traceroute, position, waypoint, alert, telemetry and text are ever read back. A client cycling portnums grew the map without bound; it now records only those six.payload.bytesis not NUL-terminated, and two readers scanned past the received size into whatever the previous occupant of the pooled packet left behind:MessageStore::addFromPacketboundedstrnlenonly byMAX_MESSAGE_SIZE, andDropzoneModulecomparedstrlen(matchCompare)bytes regardless ofpayload.size. Both are now bounded by the received size. In-field reads, so no OOB, but they leaked stale bytes into stored text and into a match decision. The twosprintfcalls there becamesnprintfwhile in the area.Item 18 from the backlog (splitting manually-verified from XEdDSA signer provenance in the warm store) needs no change: d6b12ea already added
WarmProtected::XeddsaSigneralongside the independent signer bit, so the two are distinguished.Summary by CodeRabbit